<div class="row">
<style>
img{width:50px;border:none;}
.my_red{color:red;}
.my_green{color:green;}
</style>
<!-- 表示一个成功的或积极的动作 -->
<a href="javascript:void(0)"><button type="button" class="btn btn-primary active">定向发帖</button></a>
<a href="javascript:void(0)"><button type="button" class="btn btn-primary kwPost">关键字发帖</button></a>

<form class="form-horizontal" role="form" style="margin-top:50px" action="{:U('Discuz/post')}">
   <div class="form-group">
      <label for="forum" class="col-sm-2 control-label">论坛版块</label>
      <div class="col-sm-4">
      <select class="form-control" id="forum" name="fid">
         <option value="87">影视资源</option>
         <option value="88">音乐资源</option>
         <option value="91">BT种子</option>
         <option value="94">文件集</option>
         <option value="95">网盘专辑</option>
         <option value="90">压缩资源</option>
         <option value="93">安卓软件</option>
         <option value="89">PC软件</option>
         <option value="96">iOS软件</option>
         <option value="97">网盘达人</option>
         <option value="92">电子书资源</option>
      </select>
      </div>
  </div>
   <div class="form-group">
      <label for="table" class="col-sm-2 control-label">资源来源</label>
      <div class="col-sm-4">
      <select class="form-control" id="table" name="table">
         <option value="share">普通资源【share表】</option>
         <option value="album">专辑资源【album表】</option>
         <option value="album_file">专辑文件【album_file表】</option>
         <option value="user">网盘达人【user表】</option>
      </select>
      </div>
  </div>
   <div class="form-group">
      <label for="lastname" class="col-sm-2 control-label">本轮发帖数量</label>
      <div class="col-sm-4"><input type="text" class="form-control" id="number" name="number" placeholder="100" value="100"></div>
   </div>
	<div class="form-group">
      <div class="col-sm-offset-2 col-sm-4">
         <button type="submit" class="btn btn-default">马上发帖</button>
      </div>
   </div>
</form>
</div>

<div class="modal fade" id="kwModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
   <div class="modal-dialog">
      <div class="modal-content">
         <div class="modal-body">
         	<form class="form-horizontal" id="kwForm" role="form" action="{:U('Discuz/keyword')}" method="post">
			   <div class="form-group">
			      <label for="keyword" class="col-sm-3 control-label">关键字</label>
			      <div class="col-sm-6"><input type="text" class="form-control reset" id="keyword" name="keyword" placeholder="请输入关键字[必填]"></div>
			   </div>
			   <div class="form-group">
			   	  <label for="kwfid" class="col-sm-3 control-label">发帖版块fid</label>
			      <div class="col-sm-6"><input type="number" class="form-control reset" id="kwfid" name="fid"></div>
			   </div>
			   <div class="form-group">
			   	  <label for="typeid" class="col-sm-3 control-label">主题分类typeid</label>
			      <div class="col-sm-6"><input type="number" class="form-control reset" id="typeid" name="typeid" value="0"></div>
			   </div>
			   
			    <div class="form-group">
			   	  <label for="num" class="col-sm-3 control-label">发帖数量</label>
			      <div class="col-sm-6"><input type="number" class="form-control reset" id="num" name="num" value="10"></div>
			   </div>
			   <div class="form-group">
			      <label for="table" class="col-sm-3 control-label">资源来源</label>
			      <div class="col-sm-6">
			      <select class="form-control" id="table" name="table">
			         <option value="share">普通资源【share表】</option>
			         <option value="album">专辑资源【album表】</option>
			         <option value="album_file">专辑资源文件【album_source表】</option>
			      </select>
			      </div>
			  </div>
			</form>
         </div>
         <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
            <button type="button" class="btn btn-primary kwSubmit">提交</button>
         </div>
      </div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>


<script>
   $(function(){
	   $('.kwPost').click(function(){
		   $('#kwModal').modal('show');
	   });
	   $('.kwSubmit').click(function(){
		   if($('#keyword').val()=='' || $('#kwfid').val()==''){
			   alert('关键字和发帖版块均不能为空');
			   return false;
		   }else{
			  $('#kwForm').submit(); 
		   }
	   });
   });
</script>
